package com.example.Utils;

import java.util.ArrayList;
import java.util.List;

import com.example.entity.Future;

public class FutureWeahther {
	private List<String> weatherlist, weeklist, datelist;
	private List<Integer> Lowlist, Highlist;
	public FutureWeahther() {
		super();
		weatherlist = new ArrayList<String>();
		weeklist = new ArrayList<String>();
	
		datelist = new ArrayList<String>();
		Lowlist = new ArrayList<Integer>();
		Highlist = new ArrayList<Integer>();
	}
	/**
	 * 得到未来某一天的天气情况
	 * @param future
	 */
		private void GetFutureWeather(Future future) {
			String week = future.getWeek();
			String date1 = future.getDate();
			String date = date1.substring(4, 6) + "/" + date1.substring(6, 8);
			datelist.add(date);
			String weather1 = future.getWeather();
			if (weather1.contains("转")) {
				weather1 = weather1.substring(weather1.indexOf("转") + 1,
						weather1.length());
			}
			
			weatherlist.add(weather1);
			String temperature = future.getTemperature();
			String temperatureLow = temperature.substring(0,
					temperature.indexOf("~"));
			int low=Integer.parseInt(temperatureLow);
			Lowlist.add(low);
			String temperatureHigh = temperature.substring(
					temperature.indexOf("~") + 1, temperature.length());
			int high=Integer.parseInt(temperatureHigh);
			Highlist.add(high);
			
		}
	
}
